load("//tools:defaults.bzl", "ng_project", "ng_web_test_suite")

package(default_visibility = ["//visibility:public"])

ng_project(
    name = "badge",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    assets = glob([
        "**/*.html",
        "**/*.css",
    ]),
    deps = [
        "//:node_modules/@angular/core",
        "//:node_modules/@angular/platform-browser",
        "//:node_modules/@types/jasmine",
        "//src/cdk/testing",
        "//src/cdk/testing/testbed",
        "//src/material/badge",
        "//src/material/badge/testing",
        "//src/material/button",
        "//src/material/icon",
    ],
)

filegroup(
    name = "source-files",
    srcs = glob([
        "**/*.html",
        "**/*.css",
        "**/*.ts",
    ]),
)

ng_project(
    name = "unit_tests_lib",
    testonly = True,
    srcs = glob(["**/*.spec.ts"]),
    deps = [
        ":badge",
        "//:node_modules/@angular/core",
        "//src/cdk/testing",
        "//src/cdk/testing/testbed",
        "//src/material/badge",
        "//src/material/badge/testing",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [":unit_tests_lib"],
)
